package com.liiy.missyou.simple;

import com.liiy.missyou.simple.condition.DiaraCondition;
import com.liiy.missyou.simple.hero.Camilla;
import com.liiy.missyou.simple.hero.Diana;
import com.liiy.missyou.simple.hero.Irelia;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class HeroConfiguration {
    @Bean
//    @Conditional(DiaraCondition.class)
//    @ConditionalOnProperty(value="hero.condition", havingValue = "diana", matchIfMissing = true)
    public ISkill diana(){
        return new Diana();
    }

    @Bean
//    @ConditionalOnProperty(value="hero.condition", havingValue = "irelia")
    public ISkill irelia(){
        return new Irelia();
    }

    @Bean
//    @ConditionalOnProperty(value="hero.condition", havingValue = "camilla")

    public ISkill camilla(){
        return new Camilla();
    }
}
